package com.tulingxueyuan.mall.modules.oms.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tulingxueyuan.mall.modules.oms.model.OmsOrder;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tulingxueyuan.mall.modules.oms.model.dto.OmsOrderDeliveryParamDTO;
import com.tulingxueyuan.mall.modules.oms.model.dto.OmsOrderDetailDTO;
import com.tulingxueyuan.mall.modules.oms.model.dto.OmsOrderQueryParamDTO;
import com.tulingxueyuan.mall.modules.oms.model.dto.OmsReceiverInfoParamDTO;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 * 订单表 服务类
 * </p>
 *
 * @author zhaofuhao
 * @since 2022-03-03
 */
public interface OmsOrderService extends IService<OmsOrder> {
    /**
     * 查询订单所有记录
     * @param queryParam
     * @return
     */
    Page list(OmsOrderQueryParamDTO queryParam);

    /**
     * 根据id查询订单信息
     * @param id
     * @return
     */
    OmsOrderDetailDTO detail(Long id);
    /**
     * 修改订单备注
     */
    @Transactional
    boolean updateNote(Long id, String note, Integer status);
    /**
     * 修改订单收货人信息
     */
    @Transactional
    boolean updateReceiverInfo(OmsReceiverInfoParamDTO receiverInfoParam);
    /**
     * 批量关闭订单
     */
    @Transactional
    boolean close(List<Long> ids, String note);
    /**
     * 批量发货
     */
    @Transactional
    boolean delivery(List<OmsOrderDeliveryParamDTO> deliveryParamList);
    /**
     * 批量删除订单
     */
    Boolean delete(List<Long> ids);
}
